Option Strict Off
Option Explicit On
Module Globals_Renamed
	
	Public Const cMsgBoxErrorText As String = "Error!"
	
	Public Const cINIAppName As String = "GravityBox\ScheduleExample"
	Public Const cINISection As String = "RecentFiles"
	
	Private Const cRegistrationKey As String = "Registration"
	
	Public Const gWebAddress As String = "http://www.gravitybox.com"
    Public Const gEmailText As String = "feedback@gravitybox.com"

    Public ParOut() As Object
	
    Public gAboutIcon As System.Drawing.Icon
	
	Public Const cdlOFNExplorer As Integer = &H80000
	Public Const cdlOFNHideReadOnly As Short = &H4s
	Public Const cdlOFNOverwritePrompt As Short = &H2s
	Public Const cdlOFNPathMustExist As Short = &H800s
    Public Sub SetErr(ByVal lErrNum As Integer, ByVal sErrMsg As String, ByVal sModName As String, ByVal sProcName As String, Optional ByVal sOptionalErrorText As String = "")

        'We must use this error handling since the
        'error logging uses this procedure and might
        'have an error so we can not log the error
        On Error Resume Next

        Dim sMsg As String

        If IsNothing(sOptionalErrorText) Then
            sMsg = "Error Number: " & lErrNum & vbCrLf
            sMsg = sMsg & "Module: " & sModName & vbCrLf
            sMsg = sMsg & "Procedure: " & sProcName & vbCrLf & vbCrLf
            sMsg = sMsg & sErrMsg & vbCrLf
        Else
            sMsg = CStr(sOptionalErrorText) & vbCrLf
            sMsg = sMsg & sErrMsg & vbCrLf
        End If
        Call MsgBox(sMsg, MsgBoxStyle.Exclamation, "Error!")

    End Sub
    Public Sub Main()

        Dim frmSplash As frmSplash
        frmSplash = New frmSplash()
        frmSplash.DefInstance.ShowDialog()

        Dim frmMDI As frmMDI
        frmMDI = New frmMDI()
        Call frmMDI.Initialize()
        frmMDI.DefInstance.ShowDialog()

    End Sub
    Public Function ConvertColor(ByVal MyColor As Color) As UInt32
        ConvertColor = UInt32.Parse((MyColor.Brown.B * &H10000) + (MyColor.Brown.G * &H100) + (MyColor.Brown.R))
    End Function
End Module